﻿

<h1>@String.Format("Dear {0},", ViewBag.Data.AdresseeUser.Name)</h1>

<h3>You have received the following appointment request:</h3>

<table>
    
    @if (ViewBag.Data.Appointment.RequestedStartDate != null)
    {
    <tr>
        <td>Date</td>
        <td>@ViewBag.Data.Appointment.RequestedStartDate.ToString("yyyy-MM-dd")</td>
    </tr>
    <tr>
        <td>Start time</td>
        <td>@ViewBag.Data.Appointment.RequestedStartDate.ToString("HH:mm")</td>
    </tr>
    }
    @if (ViewBag.Data.Appointment.RequestedEndDate != null){
    <tr>
        <td>End time</td>
        <td>@ViewBag.Data.Appointment.RequestedEndDate.ToString("HH:mm")</td>
    </tr>
    }
    <tr>
        <td>Title</td>
        <td>@ViewBag.Data.Appointment.Title</td>
    </tr>
    <tr>
        <td>Description</td>
        <td>@ViewBag.Data.Appointment.Description</td>
    </tr>
    <tr>
        <td>Requestor Name</td>
        <td>@ViewBag.Data.Appointment.RequestorName</td>
    </tr>
    <tr>
        <td>Requestor email</td>
        <td><a href="@String.Format("mailto:{0}",ViewBag.Data.Appointment.RequestorEmail)">@ViewBag.Data.Appointment.RequestorEmail</a></td>
    </tr>
    <tr>
        <td>Requestor phone number</td>
        <td>@ViewBag.Data.Appointment.RequestorPhoneNumber</td>
    </tr>
</table>


<p>
    <a href="@Url.Action("Index", "Appointment", new { id = ViewBag.Data.Appointment.Calendar.ID },"http")">@String.Format("Click here to accept the request: {0}", Url.Action("Index", "Appointment", new { id = ViewBag.Data.Appointment.Calendar.ID },"http"))</a>
</p>
<p>
    <a href="@Url.Action("Index", "Calendar", new { id = ViewBag.Data.Appointment.Calendar.ID}, "http")" >@String.Format("Click here to view the calendar {0}", Url.Action("Index", "Calendar", new { id = ViewBag.Data.Appointment.Calendar.ID}, "http"))</a>
</p>


@*<div id="CAL-New-Appointment-Dialog" class="CAL-Dialog">
    <div  data-bind="with: current_app"  class="div-table " >
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1">When</div>
            <div class="div-table-col CAL-EntryDialog-Col2">@ViewBag.Data.Appointment.RequestedStartDate.ToString("YYYY-MM-DD")</div>
        </div>
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1">Start time</div>
            <div class="div-table-col CAL-EntryDialog-Col2">@ViewBag.Data.Appointment.RequestedStartDate.ToString("HH:mm")</div>
        </div>
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1">End time</div>
            <div class="div-table-col CAL-EntryDialog-Col2">@ViewBag.Data.Appointment.RequestedEndDate.ToString("HH:mm")</div>
        </div>
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1">Title</div>
            <div class="div-table-col CAL-EntryDialog-Col2">@ViewBag.Data.Appointment.Title</div>
        </div>
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1 vertical-align-top">Description</div>
            <div class="div-table-col CAL-EntryDialog-Col2" >
                @ViewBag.Data.Appointment.Description
            </div>
        </div>
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1">Requestor Name</div>
            <div class="div-table-col CAL-EntryDialog-Col2">@ViewBag.Data.Appointment.RequestorName</div>
        </div>
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1">Requestor email address</div>
            <div class="div-table-col CAL-EntryDialog-Col2"> <a href="@String.Format("mailto:{0}",ViewBag.Data.Appointment.RequestorEmail)">@ViewBag.Data.Appointment.RequestorEmail</a></div>
        </div>
        <div class="div-table-row">
            <div class="div-table-col CAL-EntryDialog-Col1"> Requestor phone number</div>
            <div class="div-table-col CAL-EntryDialog-Col2">@ViewBag.Data.Appointment.RequestorPhoneNumber</div>
        </div>
    </div>
</div>*@

